package kr.hkit.powerjava.chapter11;

class AA {
	int a;

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof AA) {
			return a == ((AA)obj).a;
		}
		return false;
	}
}

public class EqualsEx {
	public static void main(String[] args) {
		AA a1 = new AA();
		a1.a = 1;
		AA a2 = new AA();
		a2.a = 1;
		
		System.out.println(a1.equals(a2)? "true":"false");
		
		
	}
}
